From 25f2526e5adc31c39cf9940653ef769dac306101 Mon Sep 17 00:00:00 2001 From: robertl Date: Fri, 28 Apr 2006 16:21:25 +0000 Subject: [PATCH] Misc minor cleanups to start to restore happiness to MSVC builds. git-svn-id: http://gpsbabel.googlecode.com/svn/trunk@1970 f51c46e8-681c-474f-0cfe-069cfd0219fb --- gpsbabel/brauniger_iq.c | 4 ++++ gpsbabel/filterdefs.h | 1 + gpsbabel/jeeps/gpslibusb.c | 2 +- gpsbabel/jeeps/gpsusbwin.c | 6 +++--- gpsbabel/tpo.c | 6 +----- gpsbabel/trackfilter.c | 1 + 6 files changed, 11 insertions(+), 9 deletions(-) diff --git a/gpsbabel/brauniger_iq.c b/gpsbabel/brauniger_iq.c index 003edeb9b..9bfb39423 100644 --- a/gpsbabel/brauniger_iq.c +++ b/gpsbabel/brauniger_iq.c @@ -66,12 +66,14 @@ static void rd_init(const char *fname) static void rd_deinit(void) { +#if BOOGER if (!GPS_Serial_Off(port, fd)) { fatal(MYNAME ": Can't shut down port '%s'\n", port); } if (!GPS_Serial_Close(fd, port)) { fatal(MYNAME ": Can't close port '%s'\n", port); } +#endif /* BOOGER */ xfree(port); } @@ -230,6 +232,7 @@ static int process_data(const unsigned char *data) static void data_read(void) { +#if BOOGER unsigned char ibuf[25]; int32 rd_cnt, ofs; @@ -262,6 +265,7 @@ static void data_read(void) } } while (GPS_Serial_Wait(fd)); fatal(MYNAME ": Incomplete download\n"); +#endif } static arglist_t brauniger_iq_args[] = { diff --git a/gpsbabel/filterdefs.h b/gpsbabel/filterdefs.h index 029786bf8..91cf930e5 100644 --- a/gpsbabel/filterdefs.h +++ b/gpsbabel/filterdefs.h @@ -40,6 +40,7 @@ filter_vecs_t * find_filter_vec(char * const, char **); void free_filter_vec(filter_vecs_t *); void disp_filters(int version); void disp_filter( const char *vecname ); +void disp_filer_vec( const char *vecname ); void disp_filter_vecs(void); void exit_filter_vecs(void); diff --git a/gpsbabel/jeeps/gpslibusb.c b/gpsbabel/jeeps/gpslibusb.c index 0adbf77ed..879d2b7c3 100644 --- a/gpsbabel/jeeps/gpslibusb.c +++ b/gpsbabel/jeeps/gpslibusb.c @@ -99,7 +99,7 @@ gusb_libusb_get_bulk(garmin_usb_packet *ibuf, size_t sz) static int -gusb_teardown(const char *pname) +gusb_teardown(gpsdevh *dh) { if (udev) { usb_release_interface(udev, 0); diff --git a/gpsbabel/jeeps/gpsusbwin.c b/gpsbabel/jeeps/gpsusbwin.c index c4c984e14..174e4ffdf 100644 --- a/gpsbabel/jeeps/gpsusbwin.c +++ b/gpsbabel/jeeps/gpsusbwin.c @@ -56,8 +56,8 @@ typedef struct { static HANDLE *usb_handle = INVALID_HANDLE_VALUE; static int usb_tx_packet_size ; -int -gusb_win_close(const char *portname) +static int +gusb_win_close(gpsdevh *handle) { if (usb_handle != INVALID_HANDLE_VALUE) { CloseHandle(usb_handle); @@ -252,7 +252,7 @@ gusb_init(const char *pname, gpsdevh **dh) } /* We've matched. Now start the specific unit. */ garmin_usb_start(hdevinfo, &devinterface); - gusb_close("blah"); + gusb_close(NULL); } gusb_list_units(); exit (0); diff --git a/gpsbabel/tpo.c b/gpsbabel/tpo.c index 5017ca8b3..c4f96e7d8 100644 --- a/gpsbabel/tpo.c +++ b/gpsbabel/tpo.c @@ -489,7 +489,6 @@ int tpo_read_32() // int tpo_read_int() { - unsigned char buff[4]; int val = 0; // Init to zero to clear higher bytes @@ -531,7 +530,6 @@ int tpo_read_int() // int tpo_find_block(unsigned int block_desired) { - char buff[4]; int block_type; int block_offset; @@ -570,7 +568,6 @@ int tpo_find_block(unsigned int block_desired) waypoint *tpo_convert_ll(int lat, int lon) { double latitude; double longitude; - double height; waypoint *waypoint_temp; @@ -961,7 +958,7 @@ void tpo_process_map_notes(void) char *waypoint_name; waypoint* waypoint_temp; unsigned int num_bytes; - int jj; + unsigned int jj; //UNKNOWN DATA LENGTH @@ -1160,7 +1157,6 @@ void tpo_process_text_labels(void) int lon; unsigned int name_length; char *waypoint_name; - char *comment; waypoint* waypoint_temp; diff --git a/gpsbabel/trackfilter.c b/gpsbabel/trackfilter.c index 27505cc26..ef4bf3c89 100644 --- a/gpsbabel/trackfilter.c +++ b/gpsbabel/trackfilter.c @@ -203,6 +203,7 @@ trackfilter_parse_fix() return fix_none; } fatal( MYNAME ": invalid fix type\n" ); + return 0; } static void -- 2.30.2